package top.iflyoung.cim.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author liguiyang
 * @description 用户实体类
 * @sine 1.8
 * @date 2021/9/220:43
 **/
@Data
@TableName("user")
public class User extends Model<User> {
    /**
     * 用户ID
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;
    /**
     * 用户姓名
     */
    @TableField("Name")
    private String name;
    @TableField("Email")
    private String email;
    @TableField("RegisterDate")
    private Date registerDate;
    @TableField("IsActive")
    private Boolean isActive;
    @TableField("Type")
    private Integer type;

    public User() {
    }

    public User(Long id, String name) {
        setId(id);
        setName(name);
    }

    public User(String name){
        setName(name);
    }
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
